<%@ page import="com.gmono.managers.UserManager" %>
<%@ page import="com.gmono.managers.User" %><%--
  Created by IntelliJ IDEA.
  User: gaozijian
  Date: 2018/12/29
  Time: 0:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String username=request.getParameter("username");
    String password=request.getParameter("password");
    //校验

    if(UserManager.Check(username,password))
    {
        User u=UserManager.getUser(username);
        session.setAttribute("loginedUser",u);
        response.sendRedirect("../backend/index.jsp");
    }
%>
<html>
<head>
    <title>登录失败</title>
</head>
<body>
    <h1>登录失败，请重新登录......3秒后退回登录页</h1>
    <script>
        setTimeout(function(){
            window.location.href="../backend/login.html";
        },3000);
    </script>
</body>
</html>
